import request from '@/utils/request'

// 查询限时购列表
export function listFlashPromotion(query) {
  return request({
    url: '/sms/flashPromotion/list',
    method: 'get',
    params: query
  })
}

// 查询限时购详细
export function getFlashPromotion(id) {
  return request({
    url: '/sms/flashPromotion/' + id,
    method: 'get'
  })
}

// 新增限时购
export function addFlashPromotion(data) {
  return request({
    url: '/sms/flashPromotion',
    method: 'post',
    data: data
  })
}

// 修改限时购
export function updateFlashPromotion(data) {
  return request({
    url: '/sms/flashPromotion',
    method: 'put',
    data: data
  })
}

// 删除限时购
export function delFlashPromotion(id) {
  return request({
    url: '/sms/flashPromotion/' + id,
    method: 'delete'
  })
}

// 导出限时购
export function exportFlashPromotion(query) {
  return request({
    url: '/sms/flashPromotion/export',
    method: 'get',
    params: query
  })
}